package com.example.springbootrbac.pojo;

public enum ResultCode {
    SUCCESS(2000,"操作成功♪"),
    SUCCESS_JUMP(2001,"访问成功♪"),
    //1100为用户相关错误
    FAILURE_USERNAME_OR_PASSWORD_ERROR(1101,"用户名或密码错误!"),
    FAILURE_USERNAME_OR_PASSWORD_EMPTY(1102,"用户名或密码不能为空!"),
    FAILURE_FORMAT_ERROR(1103,"用户名或密码格式有误！"),
    FAILURE_REGISTERED_ERROR(1104,"注册失败！用户名可能已被注册！"),
    FAILURE_LOGIN_ERROR(1106,"登陆失败"),
    FAILURE_LOGIN_OUT_TIME_ERROR(1105,"登录已失效"),
    FAILURE_REPEAT_LOGIN_ERROR(1107,"请退出当前已登录账号并重新尝试"),
    //1200为查询相关错误
    FAILURE_QUERY_ERROR(1201,"数据查询失败！"),
    //1300为删除相关错误
    FAILURE_DELETE_ERROR(1301,"数据删除失败！"),
    //1400为插入相关错误
    FAILURE_INSERT_ERROR(1401,"数据插入失败！"),
    FAILURE_NOT_IS_DBA_INSERT_ERROR(1402,"只有管理员才能发布公告！"),
    //1500为权限错误
    FAILURE_LOGIN_NOT_PERMISSION(1503, "没有权限"),
    FAILURE_FILTER_NOT_LOGIN_ERROR(1502,"要先登录才能访问哦~"),
    FAILURE_FILTER_JUMP_ERROR(1501,"暂无权限访问"),
    //1600为更新相关错误
    FAILURE_UPDATE_ERROR(1601,"数据更新失败！"),
    FAILURE_UPDATE_FOREIGN_KEY_ERROR(1602,"外码错误"),


    ;
    private int code;
    private String message;

     ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
